﻿using System;
using System.Collections;
using System.Collections.Generic;
using com.guojin.core.io;
using com.guojin.core.io.message;

namespace com.guojin.mj.net.message.game
{
    public class PlayCardReq : Message
    {

        public static int TYPE = 12;
        public static int ID = 10;

        public int LocationIndex { get; set; }
        public int DealType { get; set; }
        public int[] Cards { get; set; }

        public static PlayCardReq Creat(int locationIndex, int dealType, int[] cards)
        {
            PlayCardReq bi = new PlayCardReq();
            bi.LocationIndex = locationIndex;
            bi.DealType = dealType;
            bi.Cards = cards;
            return bi;
        }

        public void decode(Input _in)
        {

        }

        public void encode(Output _out)
        {
            _out.writeInt(LocationIndex);
            _out.writeInt(DealType);
            _out.writeIntArray(Cards);
        }

        public int getMessageId()
        {
            return ID;
        }

        public int getMessageType()
        {
            return TYPE;
        }
        
        public string toString()
        {
            return "PlayCardReq[LocationIndex=" + LocationIndex +", DealType= "+DealType+ " ]";
        }
    }
}
 